package com.imau.bean;

import lombok.Data;

import java.util.List;

@Data
public class Page<T> {

    private Long size = 10L; //每页显示条数
    private Long total;  //总条数

    private  Long pages; //总页码

    private Long currentPage = 1L; //当前页码

    private List<T> rows; //返回记录数据


    public void setPages() {
       //34 10 4页

        if(this.total % 10==0)
        {
            this.pages = this.total / this.size;

        }else{

            this.pages = this.total / this.size+1;
        }

    }
}
